home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / MacFormat 92 CD / Shareware Plus / Utilities / FolderSynchronizer 1.8.9 / PlugIn / SR / 00034_ScrBtnHThumb.ls < prev    next >
Encoding:
Text File  |  2000-03-23  |  900 b   |  30 lines

  1. on beginSprite me
  2.   set mySprite to the spriteNum of me
  3.   DrawControlHThumb(mySprite)
  4. end
  5.  
  6. on mouseDown me
  7.   global gTotLog, gCurrLog
  8.   set mySprite to the spriteNum of me
  9.   set myMember to the name of member the member of sprite mySprite
  10.   set the member of sprite mySprite to BtnDw(myMember)
  11.   set deltaH to the mouseH - the locH of sprite mySprite
  12.   repeat while the stillDown
  13.     set HA to float(the locH of sprite mySprite) - float(the left of sprite 43)
  14.     set Perc to HA / float(the width of sprite 43)
  15.     set the locH of sprite mySprite to constrainH(43, the mouseH - deltaH)
  16.     updateStage()
  17.   end repeat
  18.   set gCurrLog to integer((gTotLog - 1) * Perc) + 1
  19.   if gCurrLog < 1 then
  20.     set gCurrLog to 1
  21.   end if
  22.   if gCurrLog > gTotLog then
  23.     set gCurrLog to gTotLog
  24.   end if
  25.   set the member of sprite mySprite to BtnUp(myMember)
  26.   ReadLogText()
  27.   ImpostaHThumb()
  28.   DrawVControls()
  29. end
  30.